package com.fenghuajueli.libbasecoreui.upload;

import android.os.Build;

import com.blankj.utilcode.util.LogUtils;
import com.fenghuajueli.libbasecoreui.constants.AppConfigInfo;

public class BrandUtil {

    private static final String HUAWEI = "HUAWEI";//华为系列
    private static final String HONOR = "HONOR";//荣耀系列

    private static final String XIAOMI = "XIAOMI";
    private static final String REDMI = "REDMI";


    private static final String OPPO = "OPPO";
    private static final String REALME = "REALME";
    private static final String OnePlus = "OnePlus";


    private static final String VIVO = "VIVO";
    private static final String IQOO = "IQOO";


    /**
     * 判断是否为小米设备
     */
    public static boolean isXiaoMi() {
        LogUtils.d("当前系统标识："+Build.BRAND+"----"+Build.MANUFACTURER);
        return XIAOMI.equalsIgnoreCase(Build.BRAND)
                || XIAOMI.equalsIgnoreCase(Build.MANUFACTURER)
                || REDMI.equalsIgnoreCase(Build.BRAND)
                || REDMI.equalsIgnoreCase(Build.MANUFACTURER);
    }

    public static boolean isXiaoMiChannel() {
        return XIAOMI.equalsIgnoreCase(AppConfigInfo.CHANNEL);
    }

    public static boolean isOppoChannel() {
        return OPPO.equalsIgnoreCase(AppConfigInfo.CHANNEL);
    }

    public static boolean isVivoChannel() {
        return VIVO.equalsIgnoreCase(AppConfigInfo.CHANNEL);
    }

    /**
     * 判断是否为华为设备
     */
    public static boolean isHuawei() {
        LogUtils.d("当前系统标识："+Build.BRAND+"----"+Build.MANUFACTURER);
        return HUAWEI.equalsIgnoreCase(Build.BRAND)
                || HUAWEI.equalsIgnoreCase(Build.MANUFACTURER)
                || HONOR.equalsIgnoreCase(Build.BRAND)
                || HONOR.equalsIgnoreCase(Build.MANUFACTURER);
    }

    /**
     * 判断是否为魅族设备
     */
    public static boolean isMeizu() {
        LogUtils.d("当前系统标识："+Build.BRAND+"----"+Build.MANUFACTURER);
        return "meizu".equalsIgnoreCase(Build.BRAND)
                || "meizu".equalsIgnoreCase(Build.MANUFACTURER)
                || "22c4185e".equalsIgnoreCase(Build.BRAND);
    }

    /**
     * 判断是否是oppo设备
     *
     * @return
     */
    public static boolean isOppo() {
        LogUtils.d("当前系统标识："+Build.BRAND+"----"+Build.MANUFACTURER);
        return OPPO.equalsIgnoreCase(Build.BRAND)
                || OPPO.equalsIgnoreCase(Build.MANUFACTURER)
                || REALME.equalsIgnoreCase(Build.BRAND)
                || REALME.equalsIgnoreCase(Build.MANUFACTURER)
                || OnePlus.equalsIgnoreCase(Build.BRAND)
                || OnePlus.equalsIgnoreCase(Build.MANUFACTURER);
    }

    /**
     * 判断是否是vivo设备
     *
     * @return
     */
    public static boolean isVivo() {
        LogUtils.d("当前系统标识："+Build.BRAND+"----"+Build.MANUFACTURER);
        return VIVO.equalsIgnoreCase(Build.BRAND)
                || VIVO.equalsIgnoreCase(Build.MANUFACTURER)
                || IQOO.equalsIgnoreCase(Build.BRAND)
                || IQOO.equalsIgnoreCase(Build.MANUFACTURER);
    }

}
